Skip to content

feat(allowlist): add Julia (.jl) support#501

Merged
lizhengfeng101 merged 1 commit into
alibaba:mainfrom
hsdfat:feat/allowlist-julia
Jul 26, 2026
Merged

feat(allowlist): add Julia (.jl) support#501
lizhengfeng101 merged 1 commit into
alibaba:mainfrom
hsdfat:feat/allowlist-julia

Conversation

@hsdfat

@hsdfat hsdfat commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Description

Adds Julia (.jl) support to the review allowlist, as one of the language groups tracked in #470.

  • registers .jl in supported_file_types.json
  • adds **/test/**/*.jl to default_exclude_patterns.json, matching Julia's Pkg layout where tests live under test/ (e.g. test/runtests.jl)
  • adds a julia.md rule doc and maps **/*.jl to it in system_rules.json
  • covers all of the above with positive/negative table-test cases

The change is entirely additive — no existing extension, pattern, or mapping is altered — and follows the same shape as the merged GraphQL PR #491.

The rule doc focuses on pitfalls that are genuinely Julia-specific rather than generic lint: type stability and inference, multiple-dispatch hazards (method ambiguity, type piracy), @inbounds/indexing safety, the nothing / missing / NaN distinction, thread-safety under Threads.@threads, performance anti-patterns, and security-sensitive constructs (eval/Meta.parse on untrusted input, unsafe_* and ccall).

Note on one detail: Julia backticks build a Cmd and pass arguments to the process without a shell, so run(`tool $input`) is not itself a command-injection vector. The doc therefore flags only explicit shell invocation (sh -c, bash -c), to avoid false positives on safe code.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring (no functional changes)
  • Documentation update
  • CI / Build / Tooling

How Has This Been Tested?

  • make test passes locally
  • Manual testing (describe below)

make check (go mod tidy + gofmt -s -w . + go vet) is clean and go.mod/go.sum are unchanged. Package tests pass with the race detector:

ok github.com/open-code-review/open-code-review/internal/config/allowlist
ok github.com/open-code-review/open-code-review/internal/config/rules

Coverage on the touched packages is 88.9% (allowlist) and 86.4% (rules), both above the 80% gate.

Checklist

  • My code follows the project's coding style (go fmt, go vet)
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the documentation accordingly (if applicable)
  • I have signed the CLA

Related Issues

Part of #470
closes #500

Register the Julia extension (.jl) in the review allowlist, exclude the
Pkg test-dir convention (**/test/**/*.jl), and add a Julia review rule
doc with a glob mapping. Covered by positive/negative table-test cases in
allowed_ext_test.go and a resolve case in system_rules_test.go.

Part of alibaba#470.
@CLAassistant

CLAassistant commented Jul 25, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

Copy link
Copy Markdown
Contributor

OpenCodeReview: No comments generated. Looks good to me.

@lizhengfeng101 lizhengfeng101 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lizhengfeng101
lizhengfeng101 merged commit 013d71c into alibaba:main Jul 26, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(allowlist): add Julia (.jl) support

3 participants